package com.xxl.job.executor.controller;

import com.xxl.job.executor.config.WechatPushConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WechatPushController {
    @Autowired
    WechatPushConfig wechatPushConfig;
    @GetMapping("get")
    public String get(){
        return wechatPushConfig.toString();
    }

    @GetMapping("test/{date}")
    public String test(@PathVariable String date){
//        System.out.println(HolidayUtil.toHoliday());
//        System.out.println(HolidayUtil.toWeekendDay());
        return "test";
    }

    @GetMapping("test1/{date}")
    public String test1(@PathVariable String date){
//        HolidayUtil.updateMonthFileAndMap(LocalDate.parse(date));
        return "test1";
    }

    @GetMapping("test2/{date}")
    public String test2(@PathVariable String date){
//        HolidayUtil.updateYearFileAndMap(LocalDate.parse(date));
        return "test2";
    }
}
